package com.itheima.staticstudy;
//继承的多态,对象的上转型
public class Test {
    public static void main(String[] args) {
        Father father=new Father();
        Son son=new Son();
        System.out.println("父类count方法");
        father.count();
        System.out.println("父类sum方法");
        father.sum();
        System.out.println("- - - - - - - - - ");
        System.out.println("子类count方法");
        son.count();
        System.out.println("子类sum方法");
        son.sum();
        System.out.println("- - - - - - - - - - - - ");
        Father father1=new Son1();
        Father father2=new Son();

    }
}
